/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package phan.connection;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author bailleurs services
 */
@Entity
@Table(name = "usertable")
@NamedQueries({@NamedQuery(name = "Usertable.findAll", query = "SELECT u FROM Usertable u"), @NamedQuery(name = "Usertable.findByUserID", query = "SELECT u FROM Usertable u WHERE u.userID = :userID"), @NamedQuery(name = "Usertable.findByUserNom", query = "SELECT u FROM Usertable u WHERE u.userNom = :userNom"), @NamedQuery(name = "Usertable.findByUserPrenom", query = "SELECT u FROM Usertable u WHERE u.userPrenom = :userPrenom"), @NamedQuery(name = "Usertable.findByUserEmail", query = "SELECT u FROM Usertable u WHERE u.userEmail = :userEmail"), @NamedQuery(name = "Usertable.findByUserAdresse", query = "SELECT u FROM Usertable u WHERE u.userAdresse = :userAdresse"), @NamedQuery(name = "Usertable.findByUserVille", query = "SELECT u FROM Usertable u WHERE u.userVille = :userVille"), @NamedQuery(name = "Usertable.findByUserCode", query = "SELECT u FROM Usertable u WHERE u.userCode = :userCode"), @NamedQuery(name = "Usertable.findByUserPays", query = "SELECT u FROM Usertable u WHERE u.userPays = :userPays"), @NamedQuery(name = "Usertable.findByUserTelephone", query = "SELECT u FROM Usertable u WHERE u.userTelephone = :userTelephone"), @NamedQuery(name = "Usertable.findByUserRoleID", query = "SELECT u FROM Usertable u WHERE u.userRoleID = :userRoleID"), @NamedQuery(name = "Usertable.findByUserLogin", query = "SELECT u FROM Usertable u WHERE u.userLogin = :userLogin"), @NamedQuery(name = "Usertable.findByUserPassword", query = "SELECT u FROM Usertable u WHERE u.userPassword = :userPassword"), @NamedQuery(name = "Usertable.findByUserValide", query = "SELECT u FROM Usertable u WHERE u.userValide = :userValide"), @NamedQuery(name = "Usertable.findByBirthday", query = "SELECT u FROM Usertable u WHERE u.birthday = :birthday"), @NamedQuery(name = "Usertable.findByDateInscription", query = "SELECT u FROM Usertable u WHERE u.dateInscription = :dateInscription")})
public class Usertable implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "UserID")
    private Integer userID;
    @Column(name = "UserNom")
    private String userNom;
    @Column(name = "UserPrenom")
    private String userPrenom;
    @Column(name = "UserEmail")
    private String userEmail;
    @Column(name = "UserAdresse")
    private String userAdresse;
    @Column(name = "UserVille")
    private String userVille;
    @Column(name = "UserCode")
    private Integer userCode;
    @Column(name = "UserPays")
    private String userPays;
    @Column(name = "UserTelephone")
    private String userTelephone;
    @Column(name = "UserRoleID")
    private Integer userRoleID;
    @Column(name = "UserLogin")
    private String userLogin;
    @Column(name = "UserPassword")
    private String userPassword;
    @Column(name = "UserValide")
    private Boolean userValide;
    @Column(name = "birthday")
    @Temporal(TemporalType.DATE)
    private Date birthday;
    @Column(name = "DateInscription")
    @Temporal(TemporalType.DATE)
    private Date dateInscription;

    public Usertable() {
    }

    public Usertable(Integer userID) {
        this.userID = userID;
    }

    public Integer getUserID() {
        return userID;
    }

    public void setUserID(Integer userID) {
        this.userID = userID;
    }

    public String getUserNom() {
        return userNom;
    }

    public void setUserNom(String userNom) {
        this.userNom = userNom;
    }

    public String getUserPrenom() {
        return userPrenom;
    }

    public void setUserPrenom(String userPrenom) {
        this.userPrenom = userPrenom;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserAdresse() {
        return userAdresse;
    }

    public void setUserAdresse(String userAdresse) {
        this.userAdresse = userAdresse;
    }

    public String getUserVille() {
        return userVille;
    }

    public void setUserVille(String userVille) {
        this.userVille = userVille;
    }

    public Integer getUserCode() {
        return userCode;
    }

    public void setUserCode(Integer userCode) {
        this.userCode = userCode;
    }

    public String getUserPays() {
        return userPays;
    }

    public void setUserPays(String userPays) {
        this.userPays = userPays;
    }

    public String getUserTelephone() {
        return userTelephone;
    }

    public void setUserTelephone(String userTelephone) {
        this.userTelephone = userTelephone;
    }

    public Integer getUserRoleID() {
        return userRoleID;
    }

    public void setUserRoleID(Integer userRoleID) {
        this.userRoleID = userRoleID;
    }

    public String getUserLogin() {
        return userLogin;
    }

    public void setUserLogin(String userLogin) {
        this.userLogin = userLogin;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public Boolean getUserValide() {
        return userValide;
    }

    public void setUserValide(Boolean userValide) {
        this.userValide = userValide;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Date getDateInscription() {
        return dateInscription;
    }

    public void setDateInscription(Date dateInscription) {
        this.dateInscription = dateInscription;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (userID != null ? userID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Usertable)) {
            return false;
        }
        Usertable other = (Usertable) object;
        if ((this.userID == null && other.userID != null) || (this.userID != null && !this.userID.equals(other.userID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "phan.connection.Usertable[userID=" + userID + "]";
    }

}
